package lec07datastructure;

import java.util.Collections;
import java.util.Vector;

public class VectorDemo {
    public static void main(String[] args) {
        Vector<Integer> v = new Vector<Integer>();
        for (int i = 0; i < 10; i++) {
            v.add(i);
        }
        System.out.println(v);
        Collections.sort(v);
        System.out.println(v);
        Collections.shuffle(v);
        System.out.println(v);
        Collections.reverse(v);
        System.out.println(v.contains(4));
        System.out.println(v.indexOf(4));
        System.out.println(v.size());
        System.out.println(v.get(0));
        System.out.println(v.get(v.size() - 1));

    }
}
